import serve from "@/uitls/http.js"
const getHomeSwiper = () => serve.getAxios("/home/banner", { distributionSite: 1 });
const getHomeTwoMenu = () => serve.getAxios("/home/category/head");
const getHomeNewGoods = () => serve.getAxios("/home/new");
const getHomeHot = () => serve.getAxios("/home/hot");
const getHomeBrand = () => serve.getAxios("/home/brand");
const getCateList = (data) => serve.getAxios('/category', data)
const getGoodsList = (a) => serve.getAxios("/member/cart", a
    // {Authorization:"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ7XCJuYW1lXCI6XCJhYWFhXCIsXCJpZFwiOlwiMTM2OTU5NDk1NDczOTg1OTQ1OFwiLFwidXNlcm5hbWVcIjpcInhpYW90dXhpYW4wMDFcIn0iLCJpYXQiOjE2Nzk4ODM3MzMsImV4cCI6MTY4MDE0MjkzM30.zmQEhTaKlJKKA7FVfEdHwyUQRPtXa6tz93azRhrbYq8"
    // }
);
const getGoods = (data) => serve.getAxios('/goods', data);
const putGoods = (data) => {
    return serve.putAxios("/member/cart/" + data.id, data)
};
const addShopper = (data) => serve.postAxios("/member/cart",data);

const getOrders = () => serve.getAxios("/member/order/pre")
const putGoodsAll = (data) => {
    return serve.putAxios("/member/cart/selected", data)
}
const delGoods = (id) => {
    return serve.delAxios("/member/cart", id)
}
export default {
    getHomeSwiper,
    getHomeTwoMenu,
    getHomeNewGoods,
    getHomeHot,
    getHomeBrand,
    getCateList,
    getGoodsList,
    putGoods,
    putGoodsAll,
    delGoods,
    getGoods,
    getOrders,
    addShopper,
}